<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center choiceSchool_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub choiceSchool_fd0_0'>
          <view class='flex flex-wrap align-center choiceSchool_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  choiceSchool_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='choiceSchool_fd0_0_c1_c0'>添加学校</text>
          </view>
          <view class='flex flex-wrap align-center justify-end choiceSchool_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choiceSchool_flex_1">
        <view class='flex flex-wrap align-center choiceSchool_fd1_0'>
          <image class='choiceSchool_fd1_0_c0' mode="aspectFit" :src='STATIC_URL+"42.png"'></image>
          <benben-input class='flex-sub' type="text" :placeholder="`搜索`" confirm-type="done" :maxlength="-1"
            placeholder-style="color:rgba(191, 191, 191, 1);font-size:28rpx" @confirm="getSchoolListFunc()"
            v-model="keyworld" />
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choiceSchool_flex_2">
        <benben-select-diy ref="showSelectPopup1703830202393" class-name='flex flex-direction align-stretch flex'
          :items.sync="doneType" v-model="doneObj.aid" :label.sync="doneObj.name" default-type="aid"
          default-label="school_name" :allow-cancel='false' type="radio" :disabled='false'>
          <template v-for='(item,key0) in doneType'>
            <view v-if="item.isSelected" class='flex align-center justify-between flex choiceSchool_fd2_0_c0'
              :key="key0" @tap="$refs.showSelectPopup1703830202393.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='choiceSchool_fd2_0_c0_c0_c0' mode="aspectFit" :src='item.logo'></image>
                <view class='flex flex-direction flex-wrap align-start'>
                  <text class='choiceSchool_fd2_0_c0_c0_c1_c0'>{{item.school_name}}</text>
                </view>
              </view>
              <image class='choiceSchool_fd2_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"7.png"'></image>
            </view>
            <view v-else class='flex align-center justify-between flex choiceSchool_fd2_0_c0' :key="key0"
              @tap="$refs.showSelectPopup1703830202393.tapHandle(key0)">
              <view class='flex flex-wrap align-center'>
                <image class='choiceSchool_fd2_0_c0_c0_c0' mode="aspectFit" :src='item.logo'></image>
                <view class='flex flex-direction flex-wrap align-start'>
                  <text class='choiceSchool_fd2_0_c0_c0_c1_c0'>{{item.school_name}}</text>
                </view>
              </view>
              <image class='choiceSchool_fd2_0_c0_c1' mode="aspectFit" :src='STATIC_URL+"8.png"'></image>
            </view>
          </template><fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
            :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty></benben-select-diy>
      </view>

      <!---flex布局flex布局结束-->
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex choiceSchool_flex_3">
        <view class='flex flex-wrap align-center justify-between flex-sub choiceSchool_fd3_0'>
          <view class='flex flex-wrap align-center'>
            <text class='choiceSchool_fd3_0_c0_c0'>已选：</text>
            <text class='choiceSchool_fd3_0_c0_c0'>{{doneObj.name}}</text>
          </view>
          <button class='choiceSchool_fd3_0_c1' @tap.stop="throwSchoolFunc()">确定</button>
        </view>

      </view>
      <view :style="{height: '112rpx'}"></view>
      <benben-popup v-model="popupShow1703829582995" :mask="true" :mask-close-able="true" mode='center' :z-index='999'>
        <!---私信成功flex布局开始-->
        <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout choiceSchool_flex_4">
          <view class='flex flex-direction flex-wrap align-stretch choiceSchool_fd4_0'>
            <view class='flex flex-direction flex-wrap align-center choiceSchool_fd4_0_c0'>
              <image class='choiceSchool_fd4_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"51.png"'></image>
              <text class='choiceSchool_fd4_0_c0_c1'>转发成功</text>
              <text class='choiceSchool_fd4_0_c0_c2'>会以系统消息的形式通知到用户</text>
            </view>
            <view class='flex flex-wrap align-center justify-center choiceSchool_fd4_0_c1'
              @tap.stop="popupShow1703829582995=false">
              <text class='choiceSchool_fd4_0_c1_c0'>我知道了</text>
            </view>
          </view>
        </view>

        <!---私信成功flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  import pagingList from '@/common/mixin/paging_list.js';
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},
    mixins: [pagingList],

    data() {
      return {
        "popupShow1703829582995": false,
        "minixPagingListsApi": "",
        "pageingListApiMethod": "",
        "allowOnloadGetList": false,
        "keyworld": "",
        "doneType": [],
        "doneObj": {
          "aid": "",
          "name": "",
          email_end: ''
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      this.getSchoolListFunc()
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取学校列表
      getSchoolListFunc() {
        this.minixPagingListsApi = global.apiUrls.post6576c839268b8;
        this.pageingListApiMethod = 'get';
        this.allowOnloadGetList = false;
        this.pagingListPostDataContent = {
          school_name: this.keyworld
        }
        this.listData = [];
        this.doneType = this.listData;
        this.pagingListToggle();

      },
      //抛出学校
      throwSchoolFunc() {
        if (!validate(this.doneObj.aid, 'require')) {
          this.$message.info('请选择学校');
          return false;
        }
        let objs = this.doneType.filter(item => item.aid == this.doneObj.aid)[0]
        uni.$emit('thSchool', objs)
        this.$urouter.navigateBack(1);
      },
      pagingListPostData() {
        return this.pagingListPostDataContent
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
  }

  .choiceSchool_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .choiceSchool_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .choiceSchool_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .choiceSchool_fd0_0_c0 {
    width: 120rpx;
  }

  .choiceSchool_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .choiceSchool_flex_1 {
    padding: 24rpx 32rpx 0rpx 32rpx;
  }

  .choiceSchool_fd1_0_c0 {
    width: 24rpx;
    height: 24rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 16rpx 0rpx 0rpx;
  }

  .choiceSchool_fd1_0 {
    background: rgba(248, 248, 248, 1);
    border-radius: 50rpx;
    background-size: 100% auto;
    padding: 24rpx 32rpx 24rpx 32rpx;
  }

  .choiceSchool_flex_2 {
    margin: 8rpx 0rpx 0rpx 0rpx;
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .choiceSchool_fd2_0_c0_c1 {
    width: 36rpx;
    height: 36rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .choiceSchool_fd2_0_c0_c0_c1_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 42rpx;
  }

  .choiceSchool_fd2_0_c0_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .choiceSchool_fd2_0_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .choiceSchool_flex_3 {
    background: #FFFFFF;
    width: 750rpx;
    height: 112rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    box-shadow: 0rpx -1rpx 0rpx 1rpx rgba(0, 0, 0, 0.08);
  }

  .choiceSchool_fd3_0_c1 {
    background: rgba(100, 80, 235, 1);
    border-radius: 44rpx;
    width: 200rpx;
    line-height: 72rpx;
    font-size: 28rpx;
    color: #fff;
  }

  .choiceSchool_fd3_0_c0_c0 {
    color: #333333;
    font-size: 28rpx;
    font-weight: 400;
    line-height: 32rpx;
  }

  .choiceSchool_fd3_0 {
    padding: 0rpx 24rpx 0rpx 32rpx;
  }

  .choiceSchool_flex_4 {
    background: rgba(255, 255, 255, 1);
    background-size: 100% auto;
    border-radius: 16rpx;
  }

  .choiceSchool_fd4_0_c1_c0 {
    color: #6450EB;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 32rpx;
  }

  .choiceSchool_fd4_0_c1 {
    border-top: 1px solid #eee;
    margin: auto 0rpx 0rpx 0rpx;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .choiceSchool_fd4_0_c0_c2 {
    color: #999999;
    font-size: 24rpx;
    font-weight: 400;
    line-height: 24rpx;
    margin: 16rpx 0rpx 0rpx 0rpx;
  }

  .choiceSchool_fd4_0_c0_c1 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 700;
    line-height: 52rpx;
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .choiceSchool_fd4_0_c0_c0 {
    width: 180rpx;
    height: 180rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
  }

  .choiceSchool_fd4_0_c0 {
    padding: 32rpx 0rpx 0rpx 0rpx;
  }

  .choiceSchool_fd4_0 {
    height: 467rpx;
    width: 540rpx;
    border-radius: 16rpx;
  }
</style>
